<?php

$install_dir = 'C:/wamp/www/blog';
$themes_dir = "$install_dir/themes/";

function isDir($dir) {
  $cwd = getcwd();
  $returnValue = false;
  if (@chdir($dir)) {
    chdir($cwd);
    $returnValue = true;
  }
  return $returnValue;
}

function findThemes() {

$install_dir = 'C:/wamp/www/blog';
$themes_dir = "$install_dir/themes/";


if ($handle = opendir("$themes_dir")) {
    while (false !== ($file = readdir($handle))) {
        if ($file != "." && $file != "..") {

		echo "$file";
		
		/*
			$find = mysql_query("SELECT * FROM `themes` WHERE `name` = '$file'");
			
			if (mysql_num_rows($find) == 1){
	
			echo 'That username is already in use, please select a different one';
	
			} else {
			
			echo "$file is a new entry";
			
			*/
			
			
			
        }
    }
    closedir($handle);
}
}

function displayContent() {

switch($nav)

	{
		case "login":
		process_login();
		
		break;
		
		case "logout":
		process_logout();
		
		
			break;
			
		case "editprofile":
			include ("$staticDir/editprofile.php");
			break;	
			
		case "memberlist":
			include ("$staticDir/memberlist.php");
			break;
			
		case "register":
			include ("$staticDir/register.php");
			break;	
		
		case "addtutorial":
			include ("$staticDir/addtutorial.php");
			break;
		
		case "category":
			include ("$staticDir/viewcategory.php");
			break;
			
		case "viewpage":
			include ("$staticDir/viewpage.php");
			break;
			
		case "tutmain":
			include ("$staticDir/tutmain.php");
			break;
			
		case "forum":
			include ("$staticDir/forum.php");
			break;
		
	
			
		default:
			include ('default.php');
			break;
	}
	}




?>